<thead>
  <tr class="active">
    <th width="4%">#</th>
    <th width="22%">设备编号</th>
    <th width="18%">机柜编号</th>
    <th width="8%">U位</th>
    <th width="6%">U数</th>
    <th>设备型号</th>
    <th>设备SN号</th>
    <th>IP地址</th>
  </tr>
</thead>
<tbody>
  {% for obj in queryset %}
  <tr>
    <td>{{forloop.counter}}</td>
    <td style="word-break: break-all;">{{obj.name}}</td>
    <td style="word-break: break-all;">{{obj.rack}}</td>
    <td>{{obj.list_units}}</td>
    <td>{{obj.units.all.count}}</td>
    <td style="word-break: break-all;">{{obj.model}}</td>
    <td>{%if obj.sn|first == '_' %}无法查看{%else%}{{ obj.sn|upper }}{%endif%}</td>
    <td style="word-break: break-all;">{{obj.ipaddr}}</td>
  </tr>
  {% endfor %}
  {% if extra_for %}
  {% for i in extra_for%}
  <tr>
    <td>{{forloop.counter|add:queryset.count}}</td>
    <td style="word-break: break-all;"></td>
    <td style="word-break: break-all;"></td>
    <td style="word-break: break-all;"></td>
    <td style="word-break: break-all;"></td>
    <td style="word-break: break-all;"></td>
    <td style="word-break: break-all;"></td>
    <td></td>
  </tr>
  {% endfor %}
  {% endif %}
</tbody>
